package cn.kgm.orderObserver;

import cn.kgm.orderObserver.impl.OrderLogObserver;
import cn.kgm.orderObserver.impl.OrderMetricsObserver;
import cn.kgm.orderObserver.impl.OrderNotifyObserver;
import cn.kgm.orderObserver.pojo.PlaceOrderMessage;

public class Order extends OrderSubject{

    public static void main(String[] args) {
        doSoming();
    }

    public static void doSoming(){
        Order order = new Order();
        order.obs.add(new OrderLogObserver());
        order.obs.add(new OrderMetricsObserver());
        order.obs.add(new OrderNotifyObserver());
        order.notifyObservers(new PlaceOrderMessage());
    }
}
